<?php
/**
 * System_Model_Department
 *
 * @author mmxie
 * @copyright Copyright (c) 2009 Green Shore (http://www.iwgame.com)
 * @version $Id: Department.php 1018 2011-11-04 11:24:29Z mmxie $
 */
class System_Model_Department extends IG_Model
{

    protected $_data = array(
        'department_id' => null,
        'name' => null,
        'master' => null,
        'intro' => null,
    );

    protected $_keyPairData;

    /**
     * @param int $value
     * @return System_Model_Department
     */
    public function setDepartmentId($value)
    {
        $this->department_id = (int) $value;
        return $this;
    }

    public function getDepartmentId()
    {
        return $this->department_id;
    }

    /**
     * @param string $value
     * @return System_Model_Department
     */
    public function setName($value)
    {
        $this->name =  $value;
        return $this;
    }

    public function getName()
    {
        return $this->name;
    }

    /**
     * @param string $value
     * @return System_Model_Department
     */
    public function setMaster($value)
    {
        $this->master =  $value;
        return $this;
    }

    public function getMaster()
    {
        return $this->master;
    }

    /**
     * @param string $value
     * @return System_Model_Department
     */
    public function setIntro($value)
    {
        $this->intro =  $value;
        return $this;
    }

    public function getIntro()
    {
        return $this->intro;
    }

    public function getKeyPair()
    {
        if (!isset($this->_keyPairData)) {
            $this->_keyPairData = $this->fetchKeyPair(array('department_id', 'name'));
        }
        return $this->_keyPairData;
    }
}